load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//rs:ic-os-pkg"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/ic_os/config_types",
    "//rs/ic_os/deterministic_ips",
    "//rs/ic_os/utils",
    "@crate_index//:anyhow",
    "@crate_index//:macaddr",
    "@crate_index//:ping",
    "@crate_index//:rayon",
    "@crate_index//:regex",
    "@crate_index//:serde",
    "@crate_index//:serde_json",
    "@crate_index//:serde_with",
]

rust_library(
    name = "network",
    srcs = glob(
        ["src/**/*.rs"],
    ),
    aliases = {},
    crate_name = "network",
    proc_macro_deps = [],
    deps = DEPENDENCIES,
)

rust_test(
    name = "test",
    size = "small",
    crate = ":network",
    deps = DEPENDENCIES,
)
